package com.app.project.service.impl;

import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.RandomUtil;
import com.app.project.common.ErrorCode;
import com.app.project.constant.FileConstant;
import com.app.project.exception.BusinessException;
import com.app.project.exception.ThrowUtils;
import com.app.project.manager.CosManager;
import com.app.project.model.dto.file.ChunkUploadRequest;
import com.app.project.model.dto.file.MergeChunkRequest;
import com.app.project.service.BigFileUploadService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.*;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

@Service
@Slf4j
public class BigFileUploadServiceImpl implements BigFileUploadService {

    @Resource
    private CosManager cosManager;

    @Resource
    private RedisTemplate<String, Object> redisTemplate;

    private static final String FILE_STATUS_KEY_PREFIX = "file_status:";

}
